package com.dubbo.demo.consumer;

import com.dubbo.demo.api.User;
import com.dubbo.demo.api.UserService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: zj
 * @Description:
 * @Date: Created in 11:54 2020/8/10
 * @Modified By:
 */
@RestController
public class UserController {


    @Reference
    private UserService userService;

    @GetMapping("/get")
    public User getUser(Long id){
        return userService.getUser(id);
    }

}
